<link rel="stylesheet" href="/Css/ui-lightness/jquery-ui-1.10.4.custom.css" />
<link rel="stylesheet" href="/Css/Admin/batch_order_list.css" />
<link rel="stylesheet" href="/Css/jquery.cluetip.css" />

<script type="text/javascript" src="/Js/jquery-ui-1.10.4.custom.js"></script>

<script type="text/javascript" src="/Js/ZeroClipboard.js"></script>
<script type="text/javascript" src="/Js/jquery.form.js"></script>
<script type="text/javascript" src="/Js/common.js"></script>
<script type="text/javascript" src="/Js/adm/task/batch_order_list.js"></script>
<script type="text/javascript" src="/Js/jquery.cluetip.js"></script>

    <div class="navigate">
		<h1>订单列表</h1>
		<a class="button fr" href="/index.php/Admin/Task/">任务列表</a>
  	</div>
  	

	<!-- 汇总 -->
	<div id="div_summary" task_id="{$task.task_id}">

	</div>
	<!-- 汇总 -->


    <if condition="$is_task_order_receive">
        <if condition="$task['plantform_id'] eq 1">
            <input type="button" value="7.收货确认" id="btnOrderReceive" class="fr" />
        </if>
    </if>
		
	<!-- 分配订单 -->
	<div class="explain-col">

        <if condition="$is_task_assign_member">
		<input type="button" value="1.分配帐号" id="btnAssignMember" />
        </if>



        <if condition="$is_task_assign_url">
		<input type="button" value="2.分配下单URL" id="btnAssignURL" />
        </if>



        <if condition="$is_task_assign_address">
		<input type="button" value="3.分配收货地址" id="btnAssignAddress" />
        </if>


        <if condition="$is_task_assign_order">
		刷手:
		<select name="order_admin_id" id="order_admin_id" style="width:200px;">
			<volist name="admins" id="a">
            <option value="{$a.id}">{$a.real_name}</option>
        </volist>
        </select>

        <input type="button" value="4.确认分配" id="btnAssignOrder" />
        
		<label for="amount">选取订单范围:</label>
				
		<div id="slider-range" style="width:300px;display: inline-block;"></div>
		
		<input type="text" id="range" class="tc" style="width:80px;border:0; color:#f6931f; font-weight:bold;">
        </if>



        <if condition="$is_task_finish">
            <if condition="$task['task_status'] eq TS_FINISH">
                5.执行完毕
            <else />
                <input type="button" value="5.执行完毕" id="btnFinish" />
            </if>
        </if>


		<if condition="$is_task_reset_member">
			<input type="button" value="6.重置帐号" id="btnResetMemberId" />
		</if>





	</div>		
	<!-- 分配订单 -->
	
	
	
		<!-- 备注 -->
		<div id="div_comment" class="explain-col">

            <form id="form_task_log" action="/index.php/Admin/Task/task_log_add" method="post">
            <table>
                <tr>
                    <td>备注:</td>
                    <td>


                            <textarea name="message" id="message" rows="1" cols="70"></textarea>
                            <span class="color-red" title="必填">*</span>


                    </td>
                    <td>
                        <div class="ui-button ui-button-sorange">
                            <input type="submit" class="ui-button-text" value="提交" />
                        </div>

                        <input type="hidden" name="task_id" id="task_id" value="{$task.task_id}" />
                    </td>
                    <td>
                        <if condition="$task_logs_count gt 1">
                            <div class="ui-button ui-button-sorange">
                                <input type="button" class="ui-button-text" value="显示更多(共{$task_logs_count}条)" id="btnShowComment" />
                            </div>
                            <div class="ui-button ui-button-sorange" style="display: none !important;">
                                <input type="button" class="ui-button-text" value="隐藏更多(共{$task_logs_count}条)" id="btnHideComment" />
                            </div>
                        </if>
                    </td>
                </tr>
            </table>
            </form>


		<table id="table_task_log" cellpadding="2" cellspacing="1" class="table-list">
		<tr>
			
			<th style="width:80px;">序号</th>			
			<th style="width:200px;">内容</th>
			<th style="width:80px;">管理员</th>
			<th style="width:80px;">任务状态</th>
			<th style="width:80px;">支付状态</th>
			<th style="width:150px;">添加日期</th>
		</tr>
	
		<volist name="task_logs" id="t" key="k">
		<tr <if condition="$k gt 1">class="tr-more hidden"</if>>
			<td class="tc">{$t.no}</td>
			<td class="tl">{$t.message}</td>
			<td class="tc">{$t.real_name}</td>			
			<td class="tc">{$t.task_status_name}</td>
			<td class="tc">{$t.pay_status_name}</td>
			<td class="tc">{$t.created}</td>		
		</tr>
		</volist>
	</table>

	</div>
	<!-- 备注 -->

<table cellpadding="2" cellspacing="1" class="fixed-table table_form td-hidden"

    <thead>
    <tr>
        <th class="item_1"><input type="checkbox" id="check_all" /></th>
        <th class="item_2">订单编号</th>
        <th class="item_3">刷手</th>
        <th class="item_4">产品名称<br />产品链接</th>
        <th class="item_5">帐号<br />登录密码<br />支付密码</th>
        <th class="item_6">下单URL</th>
        <th class="item_7">订单号</th>
        <th class="item_8">快递公司</th>
        <th class="item_9">快递单号</th>
        <th class="item_10">收货人<br />电话<br />收货地址</th>
        <th class="item_11">关键词</th>
        <th class="item_12">排名</th>
        <th class="item_12">购买量</th>
        <th class="item_13">刷单价</th>
        <th class="item_14">最终价</th>
        <th class="item_15">实际<br />总金额</th>
        <th class="item_16">用券<br />金额</th>
        <th class="item_17">券后<br />金额</th>
        <th class="item_18">运费</th>
        <th class="item_19">评论</th>
        <th class="item_20">收货状态</th>
    </tr>

    </thead>

</table>

<div class="order_table">

	<!-- 订单列表 -->
	<table cellpadding="2" cellspacing="1" class="table_form td-hidden" style="width:100%;">

		<volist name="orders" id="o" >
		<tr class="<eq name="o.class" value="1">  bg-burlywood</eq>">
			<th class="item_1 <gt name="o.order_admin_id" value="0">  bg-lavender</gt>">
				
				<input type="checkbox" name="check_orders" id="orders_{$o.order_id}" value="{$o.order_id}" />
				
			</th>
			
			<td class="item_2 tc">
				<a id="is_exception-{$o.order_id}" rel="/index.php/Admin/Task/order_remark?order_id={$o.order_id}" order_id="{$o.order_id}" name="is_exception" style="cursor:pointer;" class="<if condition='$o["remark"] neq ""'>bg-green</if> <eq name='o.is_exception' value='1'>color-red</eq>">{$o.order_id}</a>
			</td>
			<td class="item_3 tc">
				<div class="short_text">{$o.real_name}</div>
			</td>
            <td class="item_4 tl">
                <div class="short_text" title="{$o.goods_name}"><a href="{$o.goods_url}" target="_blank">{$o.goods_name}</a></div>
                <div class="short_text" title="{$o.goods_url}"><a href="{$o.goods_url}" target="_blank">{$o.item_id}</a></div>
            </td>
			<td class="item_5 tl">
				
				<div class="act-color" id="member_name_clip_container-{$o.order_id}" style="position:relative">
					<div prefix="member_name" id="member_name_clip_button-{$o.order_id}" class="my_clip_button">{$o.member_name}</div>
				</div>

                <div class="act-color" id="member_pwd_clip_container-{$o.order_id}" style="position:relative">
                    <div prefix="member_pwd" id="member_pwd_clip_button-{$o.order_id}" class="my_clip_button">{$o.member_pwd}</div>
                </div>

                <div class="act-color" id="member_pay_pwd_clip_container-{$o.order_id}" style="position:relative">
                    <div prefix="member_pay_pwd" id="member_pay_pwd_clip_button-{$o.order_id}" class="my_clip_button">{$o.member_pay_pwd}</div>
                </div>

			</td>
			<td class="item_6 tl vam">
				<div class="act-color" id="order_url_clip_container-{$o.order_id}" style="position:relative">
					<div prefix="order_url" id="order_url_clip_button-{$o.order_id}" class="my_clip_button short_text">{$o.order_url}</div>
				</div>
			</td>
            <td class="item_7 tc vam">
                <input type="text" class="tr w60" id="order_sn-{$o.order_id}" name="order_sn" value="{$o.order_sn}" />
            </td>
			<td class="item_8 tc vam">
				<select name="shippings" id="shipping-{$o.order_id}" class="w80">
					<option value="0"></option>
					<volist name="shippings" id="s">
					<option value="{$s.shipping_id}"<if condition="$s.shipping_id eq $o['shipping_id']"> selected</if>>{$s.shipping_name}</option>
					</volist>
		        </select>

			</td>
            <td class="item_9 tc vam">
                <input type="text" class="tr w80" id="invoice_no-{$o.order_id}" name="invoice_no" value="{$o.invoice_no}" />
            </td>
			<td class="item_10 tl">
			
			
				<div class="act-color" id="consignee_clip_container-{$o.order_id}" style="position:relative">
					<div prefix="consignee" id="consignee_clip_button-{$o.order_id}" class="my_clip_button short_text">{$o.consignee}</div>
				</div>

                <div class="act-color" id="mobile_phone_clip_container-{$o.order_id}" style="position:relative">
                    <div prefix="mobile_phone" id="mobile_phone_clip_button-{$o.order_id}" class="my_clip_button short_text">{$o.mobile_phone}</div>
                </div>

                <div class="act-color" id="address_clip_container-{$o.order_id}" style="position:relative">
                    <div prefix="address" id="address_clip_button-{$o.order_id}" class="my_clip_button short_text" style="width:130px;">{$o.address}</div>
                </div>

			</td>


			<td class="item_11 tc" title="{$o.keywords}">
								
				<div class="act-color" id="keywords_clip_container-{$o.order_id}" style="position:relative">
					<div prefix="keywords" id="keywords_clip_button-{$o.order_id}" class="my_clip_button">{$o.keywords}</div>
				</div>
				
			</td>
            <td class="item_12 tc">
                {$o.search_rank}
            </td>
			<td class="item_12 tc">
				{$o.goods_number}
			</td>
			<td class="item_13 tr">
				{$o.goods_amount}
			</td>
			<td class="item_14 tr">
				{$o.final_price}
			</td>
			<td class="item_15 tr">
				<span id="real_price-{$o.order_id}">{$o.real_price}</span>
				
			</td>
			<td class="item_16">
				<input type="text" class="tr w40" id="bonus_money-{$o.order_id}" name="bonus_money" value="{$o.bonus_money}" />
			</td>
			<td class="item_17">
				<input type="text" class="tr w40" id="paid_amount-{$o.order_id}" name="paid_amount" value="{$o.paid_amount}" />
			</td>
			<td class="item_18">
				<input type="text" class="tr w40" id="shipping_fee-{$o.order_id}" name="shipping_fee" value="{$o.shipping_fee}" />
			</td>
			<td class="item_19 tl" title="{$o.comment}">
				
				<div class="act-color" id="comment_clip_container-{$o.order_id}" style="position:relative">
					<div prefix="comment" id="comment_clip_button-{$o.order_id}" class="my_clip_button short_text">{$o.comment}</div>
				</div>

			</td>
            <td class="item_20 tc receive_status" id="receive_status-{$o.order_id}">{$o.receive_status_name}</td>
		</tr>
		</volist>
	</table>
	<!-- 订单列表 -->
	
</div>



	<div class="btn">
		<include file="Common:pager" />
    </div>


<input type="hidden" name="day_span" id="day_span" value="{$day_span}" />